#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
# - http://heavyz.blogspot.com/
# - http://buggarden.blogspot.com/
#
# AFCP webapp URL mappings.
#
# Created on 2008-10-28.
# $Id: urls.py 300 2008-12-15 14:56:43Z heavyzheng $
#

from django.conf.urls.defaults import patterns

urlpatterns = patterns( "afcpweb.apps.afcp.views",

    ( r"^$"                                   , "home"               ),
    ( r"^lang/$"                              , "change_language"    ),
    ( r"^login_ok/(?P<url>.*)$"               , "login_ok"           ),
    ( r"^logout_ok/(?P<url>.*)$"              , "logout_ok"          ),
	
	( r"^static/about/$"							, "about"		 ),	
    ( r"^static/about/(?P<name>\w+)/$"              , "about"        ),
    ( r"^static/about/(?P<name>\w+)/(?P<lang>.+)/$" , "about"        ),
    ( r"^static/contact/$"							, "contact"		 ),	
	( r"^static/contact/(?P<lang>\w+)/$"            , "contact"      ),	
	( r"^amusement/$"                             , "amusement"      ),
	( r"^amusement/(?P<name>\w+)/$"               , "amusement"      ),
	
	( r"^error/$"                             , "error_page"         ),
    ( r"^news/$"                     		  , "news"      ),
   

    ( r"^members/$"                           , "members"            ),
    ( r"^profile/(?P<uid>\w+)/$"              , "profile"            ),
    ( r"^profile/(?P<uid>\w+)/photo/$"        , "profile_photo"      ),
    ( r"^my_profile/$"                        , "my_profile"         ),
    ( r"^random_profile/$"                    , "random_profile"     ),
    ( r"^ecole/(?P<acronym>\w+)/$"            , "ecole"              ),
    ( r"^university/(?P<acronym>\w+)/$"       , "university"         ),
    ( r"^planet/$"                            , "planet_afcp"        ),
	
	( r"^inscription/create/$"				  , "create_inscription" 			   ),
	( r"^inscription/create/(?P<uid>\w+)/$"	  , "create_inscription" 			   ),
	( r"^inscription/cancel/(?P<uid>\w+)/$"	  , "cancel_inscription" 			   ),
	
    ( r"^admin/$"                             		, "admin"               	   ),
	( r"^admin/membre/$"					    	, "admin_membre"	    	   ),
	
	( r"^admin/inscription/$"                   	, "admin_inscription"    	   ),
	( r"^admin/inscription/show/(?P<uid>\w+)/$"	    , "admin_show_inscription"	   ),

	( r"^admin/inscription/cancel/(?P<uid>\w+)/$"	, "admin_cancel_inscription"   ),
	
	( r"^admin/inscription/change/(?P<uid>\w+)/$"   , "admin_change_inscription"   ),
	( r"^admin/inscription/confirm/(?P<uid>\w+)/$"   , "admin_confirm_inscriptor"  ),
	( r"^admin/inscription/confirmandemail/(?P<uid>\w+)/$" , "admin_confirm_email_inscriptor"  ),
	( r"^admin/inscription/csv/$" 						   , "admin_csv_output"  ),
	
	( r"^admin/activity/$"				  	 	  	, "admin_activity" 			   ),
	( r"^admin/activity/create/$"				  	, "admin_create_activity" 	   ),
	( r"^admin/activity/setcurrent/$"				, "admin_set_current_activity" ),
	( r"^admin/activity/create/(?P<uid>\w+)/$"	  	, "admin_create_activity" 	   ),
	( r"^admin/activity/show/(?P<uid>\w+)/$"	  	, "admin_show_activity" 	   ),
	( r"^admin/activity/cancel/(?P<uid>\w+)/$"	  	, "admin_cancel_activity" 	   ),
	


	# TODO:
	# ( r"^cv/(?P<uid>\w+)/$"                   , "cv"                 ), # TODO: remove me!
	# ( r"^cv/(?P<uid>\w+)/(?P<lang>\w+)/$"     , "cv"                 ),
	# ( r"^ecole/(?P<acronym>\w+)/$"            , "ecole"              ),
	# ( r"^promo/(?P<promo>\d+)/$"              , "promo"              ),
	
	# 404 not-found: must be the last URL pattern.
	( r"^.*$"                                 , "not_found"          ),
)

